subroutine calcsmall(iijka, iabij, &
          t1, t2, r1, r2, &
          fae, fmi, fme, fai, &
          wmnij, icore) 
!use common
use mod_iop
use mod_size
use mod_orbit
use mod_ioff 
implicit none
real*8, intent(inout) :: t1(*), t2(*), r1(*), r2(*) 
real*8, intent(inout) :: iijka(*), iabij(*)
real*8, intent(inout) :: fae(*), fmi(*), fme(*), fai(*)
real*8, intent(inout) :: wmnij(*)
real*8, intent(inout) :: icore(*)
!
!
call effectt2(t2, t1, icore, 0.5d0, no, nv)
!write(6,*)'test1'
!
call fae_t2famn_ifemn(fae, t2, iabij, icore, -0.5d0)
!write(6,*)'test2'
!
call fmi_t2efni_iefnm(fmi, t2, iabij, icore, 0.5d0)
!write(6,*)'test2'
!
call fmi_t1en_imnie(fmi, iijka, t1, icore, 1.d0)
!write(6,*)'test2'
!
call fme_t1fn_iefmn(fme, t1, iabij, icore, 1.d0)
!write(6,*)'test2'
call fae_t1am_fem(fae, t1, fai, icore, -0.5d0)
call fmi_t1ei_fem(fmi, t1, fai, icore, 0.5d0)
!
call effectt2(t2, t1, icore, -0.5d0, no, nv)
!============================
call effectt2(t2,t1, icore, 1.d0, no, nv)
call wmnij_t1ej_imnie(wmnij, iijka, t1, icore, 1.d0)
!
!write(6,*)'test3'
call wmnij_iefmn_t2efij(wmnij, iabij, & 
            t2, icore, 0.5d0)
call effectt2(t2, t1, icore, -1.d0, no, nv)
!
!============================
if(ldebug) then 
call printdnrm2('r1small 0', r1, 22)
endif
call r1ai_t1am_fmi(r1, t1, fmi, icore, -1.d0)
if(ldebug) then 
call printdnrm2('r1small 1', r1, 22)
endif
!write(6,*)'test3'
!
call r1ai_t1ei_fae(r1, t1, fae, icore, 1.d0)

if(ldebug) then 
call printdnrm2('r1small 2', r1, 22)
endif
!
!write(6,*)'test3'
call r1ai_t2eamn_imnie(r1, t2, iijka, icore, 0.5d0)
if(ldebug) then 
call printdnrm2('r1small 3', r1, 22)
endif
!
call r1ai_t2aeim_fme(r1, t2, fme, icore, 1.d0)
if(ldebug) then 
call printdnrm2('r1small 4', r1, 22)
endif
!
!write(6,*)'test3'
call fae_t1am_fem(fae, t1, fme, icore, -0.5d0)
call fmi_t1ei_fem(fmi, t1, fme, icore, 0.5d0)
!
call r2abij_t2aeij_fbe(r2, t2, fae, icore, 1.d0)
if(ldebug) then 
call printdnrm2('r2small 1', r2, 3)
endif
!============================
!write(6,*)'test3'
call r2abij_t2abim_fmj(r2, t2, fmi, icore, -1.d0)
if(ldebug) then 
call printdnrm2('r2small 2', r2, 3)
endif
!============================
call effectt2(t2, t1, icore, 1.d0, no, nv)
!
!write(6,*)'test4'
call r2abij_t2abmn_wmnij(r2, t2, wmnij, icore, 0.5d0) 
if(ldebug) then 
call printdnrm2('r2small 3', r2, 3)
endif
!
call effectt2(t2, t1, icore, -1.d0, no, nv)
!============================
!write(6,*)'test4'
!--------------------------
call r2abij_t1am_iijmb(r2, t1, iijka, icore, -1.d0)
if(ldebug) then 
call printdnrm2('r2small 4', r2, 3)
endif
!============================
!write(6,*)'test4'
!
return
end 
